<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>Dashboard - Ace Admin</title>
    <meta name="description" content="overview &amp; stats" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    #@includeBaseCss()
  </head>

  <body class="no-skin">
    <!-- #section:basics/navbar.layout -->
    <div class="main-container" id="main-container">
      <div class="main-content">
        <div class="main-content-inner">
          <!-- #section:basics/content.breadcrumbs -->
          <div class="page-content">

            <div class="row">
              
              <div class="col-xs-12">
                <div class="row-fluid" style="margin-bottom: 5px;">
                  <div class="span12 control-group">
                    <button class="btn btn-success" id="btn-visible" />启用</button>
                    <button class="btn btn-danger" id="btn-unvisible" />禁用</button>
                    #hasPermission("/app/addApp")
                      <button class="btn btn-primary" id="btn-add" >添加应用</button>
                    #end
                    #hasPermission("/app/addApp")
                      <button class="btn btn-info" id="btn-edit" />修改应用</button>
                    #end
                  </div>
                </div>
                <!-- PAGE CONTENT BEGINS -->
                <table id="grid-table"></table>

                <div id="grid-pager"></div>

                <script type="text/javascript">
                  var $path_base = "..";//in Ace demo this will be used for editurl parameter
                </script>

                <!-- PAGE CONTENT ENDS -->
              </div><!-- /.col -->
            </div><!-- /.row -->
            
          </div>
        </div>
      </div><!-- /.main-content -->

      #@footer()

      <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
      </a>
    </div><!-- /.main-container -->

    <!-- basic scripts -->
  #@includeBaseJs()
   <script type="text/javascript">
     
     $(document).ready(function(){




            $("#grid-table").jqGrid({
                url:'#(ctx)/app/getListData',
                mtype: "GET",
                datatype: "json",
                colModel: [
                    { label: '序号', name: 'id', key: true, width: 30,sortable:false },
                    { label: '版本号', name: 'version_no', width: 40 ,sortable:false},
                    { label: '自然数版本号', name: 'nature_no', width: 30 ,sortable:false},
                    { label: '强制升级', name: 'is_force',formatter:isForce, width: 30 ,sortable:false},
                    { label: '下载地址', name: 'url',formatter:download, width:50,sortable:false},
                    { label: '系统', name: 'os', width:40,sortable:false },
                    { label: '状态', name: 'status',formatter:fmatterStatus, width:40,sortable:false }
                ],
                viewrecords: true,
                height: 280,
                rowNum: 10,
                multiselect: true,//checkbox多选
                altRows: true,//隔行变色
                recordtext:"{0} - {1} 共 {2} 条",
                pgtext:"第 {0} 页 共 {1} 页",
                pager: pager_selector,
                loadComplete : function() {
                var table = this;
                setTimeout(function(){
                  updatePagerIcons(table);
                }, 0);
              }
            });

     });

   </script>

    <!-- the following scripts are used in demo only for onpage help and you don't need them -->
    
  </body>
</html>
